package com.gpio;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DateTimeUtil {

	private static final String DATE_TIME_FMT = "yyyy-MM-dd HH:mm:ss"; // 日期时间
	
	public static String getCurrentDateTimeStr(String fmt) {
		String temp = new SimpleDateFormat(fmt).format(new Date());
		return temp;
	}
	
	public static String getCurrentDateTimeStr() {
		return getCurrentDateTimeStr(DATE_TIME_FMT);
	}
}
